namespace NHCodeFirst
{
    using System;
    using System.Collections.Generic;
    using System.Linq.Expressions;
    using NHibernate.Linq;

    public class DbSet<T> : DbSetBase<T,DbSet<T>> where T : class
    {
        public DbSet(DbContext context) : base(context)
        {
            child = this;
        }

        public FetchedDbSet<T,TProperty> Include<TProperty>(Expression<Func<T,TProperty>> selector)
        {
            return new FetchedDbSet<T, TProperty>(dbContext, queryable.Fetch(selector));
        }

        public FetchedDbSet<T,TProperty> IncludeMany<TProperty>(Expression<Func<T,IEnumerable<TProperty>>> selector)
        {
            return new FetchedDbSet<T, TProperty>(dbContext, queryable.FetchMany(selector));
        }
    }
}